package com.swgk.core.view.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.stx.xhb.androidx.entity.BaseBannerInfo;

import java.io.Serializable;

public class EnterpriseRecEntity implements Parcelable, Serializable, BaseBannerInfo {

    private String companyName;
    private String companyNo;
    //是否被选中
    private boolean select;

    protected EnterpriseRecEntity(Parcel in) {
        companyName = in.readString();
        companyNo = in.readString();
        select = in.readByte() != 0;
    }

    public static final Creator<EnterpriseRecEntity> CREATOR = new Creator<EnterpriseRecEntity>() {
        @Override
        public EnterpriseRecEntity createFromParcel(Parcel in) {
            return new EnterpriseRecEntity(in);
        }

        @Override
        public EnterpriseRecEntity[] newArray(int size) {
            return new EnterpriseRecEntity[size];
        }
    };

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(companyName);
        dest.writeString(companyNo);
        dest.writeByte((byte) (select ? 1 : 0));
    }

    @Override
    public Object getXBannerUrl() {
        return null;
    }

    @Override
    public String getXBannerTitle() {
        return null;
    }
}
